<!DOCTYPE html>
<html>
	<head>
		<!-- 设置浏览器不缓存 -->
		<META HTTP-EQUIV="pragma" CONTENT="no-cache">
		<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
		<META HTTP-EQUIV="expires" CONTENT="0">
		<!-- Content-Type -->
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<!-- Favicon -->
		<link rel="shortcut icon" href="./images/logo.png">
		<title>企业服务共享中心-个人流转单销售详细</title>
		<!--stylesheets-->
		<link rel="stylesheet" href="./plugins/element/index.css">
		<script src="./plugins/vue/vue.js"></script>
		<script src="./plugins/element/index.js"></script>
		<script src="./plugins/axios/axios.min.js"></script>
		<script src="./js/common/public.js?v=0.8.0.3"></script>
		<!-- 自定义样式表 -->
		<link rel="stylesheet" href="./css/base.css?v=0.8.0.3">
	</head>
	<body>
		<div id="app">
			<template>
				<el-container class="maincontainer">
					<el-container class="submaincontainer">
						<el-card class="box-card" style="position:relative;width:330px" shadow="never"
							v-show="leftbar_show">
							<div
								style="position:absolute;left:0;top:0;right:0;bottom:0;overflow-y:auto;overflow-x:hidden;padding-left: 20px;padding-top: 20px;padding-right: 20px;">
								<el-form :model="queryForm" :rules="queryRules" ref="queryForm">
									<el-form-item label="月份选择" prop="datetime">
										<el-date-picker style="width:235px" value-format="yyyy-MM"
											width="100" align="right"
											v-model="queryForm.datetime"
											type="month"
											unlink-panels
											placeholder="选择月份">
										</el-date-picker>
									</el-form-item>

									<el-form-item>
										<el-button size="small" type="primary" @click.native.prevent="start"
											style="position:fixed;left:20px;bottom:5px;">查询</el-button>
									</el-form-item>
								</el-form>
							</div>
						</el-card>

						<el-card class="box-card" style="width:100%" shadow="never">
							<div slot="header" class="clearfix">
								<i v-on:click="showLeftBar();" v-bind:class="[leftbar_show ? 'el-icon-s-fold' : 'el-icon-s-unfold']" style="color:#409EFF;cursor:pointer;"></i>
								<span>月销售统计报表</span>
							</div>
							<div>
								<el-table row-key="id" border :data="data" tooltip-effect="dark"
									:height="tableHeight" style="width: 100%;" :span-method="objectSpanMethod">
									<el-table-column prop="dept" label="部门"></el-table-column>
									<el-table-column prop="name" label="姓名"></el-table-column>
									<el-table-column v-for="item in theader" :label="item.name" ><!-- 周 -->
										<el-table-column v-for="subitem in item.data" :label="subitem.name" ><!-- 月 -->
											<el-table-column :label="subitem.data" ><!-- 星期 -->
												<template slot-scope="scope">
													<div v-if="scope.row[subitem.name + '_transformid']">
														<el-button type="text" @click="getTransFormDatas(scope.row[subitem.name + '_transformid'])">
															{{scope.row[subitem.name]}}
														</el-button>
													</div>
													<div v-if="! scope.row[subitem.name + '_transformid']">
														{{scope.row[subitem.name]}}
													</div>
												</template>
											</el-table-column>
										</el-table-column>
										<el-table-column label="周总计" :prop="item.name"></el-table-column>
									</el-table-column>
									<el-table-column label="月总计" prop="salesVolume"></el-table-column>
								</el-table>
							</div>
						</el-card>
					</el-container>
				</el-container>

				<el-dialog :close-on-click-modal="false"  title="流转信息" :visible.sync="transFormVisible" width="1000px" style="height:800px;">
					<el-table :show-overflow-tooltip="true" border show-summary :summary-method="getSummaries" :data="transFormData" tooltip-effect="dark" size="mini" height="500px" width="900">
						<el-table-column label="流转单号" prop="id" show-overflow-tooltip>
						</el-table-column>
						<el-table-column label="销售单号" prop="mycustomer_id">
						</el-table-column>
						<el-table-column label="流转日期" prop="transdate">
						</el-table-column>
						<el-table-column label="公司名称" prop="compname" show-overflow-tooltip>
						</el-table-column>
						<el-table-column label="收款日期" prop="collectiondate" >
						</el-table-column>
						<el-table-column label="应收金额" prop="amountreceivables" >
						</el-table-column>
						<el-table-column label="实收金额" prop="amountpayin" >
						</el-table-column>
						<el-table-column label="尾款金额" prop="amountend" >
						</el-table-column>
						<el-table-column label="收款人" prop="username" >
						</el-table-column>
					</el-table>

					<div slot="footer">
						<el-button @click="transFormVisible = false">取 消</el-button>
					</div>
				</el-dialog>

			</template>
		</div>
	</body>
	<script src="./js/personalsales.js?v=0.8.0.3"></script>
	</script>
</html>

